package org.hcyspartnoc.demo.dao;

import org.hcyspartnoc.demo.entity.Course;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.data.repository.query.Param;

public interface PointDao extends Neo4jRepository<Course,Long> {


    @Query("MATCH (n) " +
            "where id(n) = $nodeId " +
            "CREATE (p:point {name: $name,value: $value}) " +
            "MERGE (n)-[:包含]->(p)")
    void savePointNode(@Param("nodeId") Integer nodeId,
                       @Param("name") String name,
                       @Param("value") String value);
}
